Log In  
[back to top]


hs
by dw817
Cart #hs-0 | 2019-11-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6


TO LOAD THIS CART in immediate mode, type:

load #hs

Hyperspace or falling into a black hole. Whichever you think it might be. In any case, thought I would create a new post for this example. Earlier I was explaining some of the interesting things you can do with the PALETTE.

Here is a small example using all 15-colors of the 16-total. It uses the exact same principle you see as the snowflake animation found HERE:

https://www.lexaloffle.com/bbs/?tid=35927

So in the animation itself, no pixels are actually being drawn or moved. Only the palette is manipulated. Two per animation cycle at 30fps and likely using zero CPU if any at all despite how many sprites "appear" to be moving.

[ Continue Reading.. ]

6
9 comments



gt
by dw817
Cart #gt-1 | 2019-11-15 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

Wait a minute. Strike that.

Reverse it. Thank you.

Actually this should be titled, "A Tribute To Glowing."

Standard graphics on modern computers today do NOT have a palette. So - what exactly is the difference between graphics that use a palette and that which does not ?

Well generally one that does not means you have total freedom. That is if you can have 256-brightness levels for Red, Green, and Blue, why then you have a total of 16,777,216 colors available per pixel to you !

Nice indeed. So how does this differ from a system that uses a palette ?

well it all started years ago. Let's go back to QBasic for the IBM-pc which would let you have a choice. A 640x480 B&W pixeled screen, a single 320x240 256-color screen, or sixteen 320x240 16-color screens.

[ Continue Reading.. ]

3
0 comments



hg
by dw817
Cart #hg-6 | 2019-11-12 | Code ▽ | Embed ▽ | No License
4


Hold (O) to see the cycle of life.
TO LOAD THIS CART in immediate mode type:

load #hg

While the cart I'm working on now (and have been for several days) is quite a bit bigger than 560-bytes (hundreds of lines), seeing Conway's life program reiterated reminded me of my Father.

For years ago he wrote a program in Turbo Pascal he called the "Cycle Of Life."

In it, he had 3-different colored pixels randomly appearing on the screen in a 640x480 screen.

He told me that one pixel chases the other and the last chases the first. I really didn't understand him so he explained it to me.

[ Continue Reading.. ]

4
6 comments



[128x128]

You may have seen a few carts show impossible logos both in the BBS and in Splore. Impossible in the fact that you scan both code and memory to see where the logo is but it's nowhere to be found.

So - just how did they get that logo on there in the first place ?

Well, with a little bit of trickery, actually. You can do the same thing in truth.

Load up your cart. In immediate mode type:

export spr.png

to export your tiles to a temporary file.

Then type:

import logo.png

The 128x128 logo that you want.

At the bottom of your code or the first lines in _init() add:

memcpy(24576,0,8192)
repeat until forever

[ Continue Reading.. ]

39
5 comments



sa
by dw817
Cart #sa-0 | 2019-11-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1


To load this program in Pico-8, type:

load #sa

Shuffling a deck of cards on a computer has come a long way, hasn't it ?

The classic method is to go through each card one at a time and shuffle them by taking the index card and swapping it with a random card anywhere in the deck.

The problem with this method is that after a shuffle if the first card is say 2 of Spades, then you already know the next card will be Ace of Spades. So, yeah, it's not perfect.

Another way is to create a table picking a random number from 0-51 adding it to an array until the deck is filled. This will work but it can be slow once it gets near the end picking that random number from 0-51 to get that very last card that is not in the deck.

[ Continue Reading.. ]

1
6 comments



Was just experimenting with arrays, starting to understand NEW and DEL a little better, when I came across this:

set={}
for i=1,6 do
  set[i]=i
end
newset=set
newset[3]=0
?set[3]

What gives ? The correct answers should be "3."

Normal BASIC with "newset=set" would just copy the array to a new array and let you work with it as a new array. You can't do this in Pico-8 as apparently it's just a shortcut to the original array ?

Is there a way to copy one array to another easily ? Like newset=set{} or something ?

6 comments



dx
by dw817
Cart #dx-4 | 2019-11-24 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2


To load this cart in Pico-8, type:

load #dx

VVhat's new ?

  • Added visible footprints so you can see where you've been.
  • Now does not show maze-drawing process.
  • Fixed up sprites a bit.
  • Am researching recursion as a possible maze-maker.

There are 2-ways you can navigate this maze.

  1. Just using your footprints as a guide.
  2. Press (X) to turn on the auto-mapper and use that as a guide.

This is not so much a game (although you can play it) as a proof of concept.

Something I've wanted to do is have code that automatically builds a fairly large dungeon, in this case 125x125 tiles is a fine testing area and build a maze that cuts the edge of the walls intelligently leaving space for the player to move around, so the corridors are not 1x1 tile in size but actually 3x3 floor space and 2x2 walls.

[ Continue Reading.. ]

2
0 comments



I was just watching a video about Loot Boxes and how Online games charge players real money in order to gain these items, which apparently are random items that can benefit the player to progress further in them.

Outlawed in several countries apparently.

https://www.pcgamer.com/the-legal-status-of-loot-boxes-around-the-world-and-whats-next/

And this is new stuff for me, the first I've heard of it. I know, now you can think on that a bit if you like. Sometimes I get so wrapped up in coding I'm unaware of the world around me.

However, I was thinking this might be something good and nice to have for Pico-8.

Not real loot boxes, not the ones that cost money anyways. But no, perhaps missions a player could go on in some of these advanced Pico-8 carts. The reward ? A loot box, completely free, earned by the dedication (and perhaps perspiration) of the player to go beyond the call of duty on side-quests and other items that the average player may skip over in their haste to see the ending to the game.

[ Continue Reading.. ]

1
6 comments



dt
by dw817
Cart #dt-0 | 2019-10-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
19


TO LOAD THIS CART, type the following in immediate mode:

load #dt

You've probably seen some pretty amazing things in graphic demos done for Pico-8, none to me more satisfying than the dither effect I've seen between two colors, where one side of the screen is black, the other white, and a complex and beautiful pattern between both showing a kind of fade ability using only the same-color pixels.

The fill pattern is by @Megus, and you can find his demoscene cart HERE:

https://www.lexaloffle.com/bbs/?tid=35774

Now while he and his crew have made an amazing demo, this tutorial and focus will be only on the dither technique used to create a division between two-colors. While it looks great on 3-dimensional models, it is also quite a thing of beauty to appear even on the screen just by itself.

[ Continue Reading.. ]

19
4 comments



Cart #nine_keys-3 | 2019-10-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3


TO LOAD THIS in Pico-8 type:

load #nine_keys

I am not at all certain if Pico-8 runs 100% correctly on Android and cellphones. I would like to think that if it is not, that @zep is certainly doing his level best to ensure that it can.

This program is fairly simple but opens up input, especially for a touchscreen Android and touchscreen cellphone.

I had originally worked this into a complex cellphone driven programming language earlier with 15 buttons in a 5x3 format, but the language is cumbersome, slow, and not at all user-friendly.

So I have put it here. You can test it with the mouse if you like.

6 buttons are already active.

[ Continue Reading.. ]

3
4 comments



Cart #sufehasede-0 | 2019-10-25 | Code ▽ | Embed ▽ | No License

I was interested in making a type of high-number integer counter relying on the length and accuracy of 4-digit decimal numbers less than 1 when I came across this little slice of misfortune.

Here is the source to see there is no complication on my part:

-- real numbers are flawed!

function key()
  repeat
    flip()
  until btnp(4)
end

b=1
e=10

for i=1,5 do
  cls()
  ?"counting "..b.." to "..e.."."
  key()
  ?""
  for i=b,e,b do
    ?i
  end
  key()
  b/=10
  e/=10
end
?""
color(10)
?"complete!"
repeat
  key()
until forever

[ Continue Reading.. ]

10 comments



Was curious to know if you could run and program modern Pico-8 (pico-8_0.1.12c) on this particular piece of hardware:

https://store.planetcom.co.uk/collections/devices/products/gemini-pda-1

Also, do you have Pico-8 running on something off the shelf of a desktop Windows computer ? If so feel free to reply with your findings, both positive and negative, on the portable device you run yours from.

... Or can you recommend some device outside of PocketCHIP that effectively runs Pico-8 and allows you to efficiently code on it besides ?

I'm trying to avoid any reviews of PocketCHIP as the keyboard and physical design look REALLY BAD. (can't fold it and looks like a puffed up membrane keyboard). :(

In all case, please include images, links, and/or prices of the other compatible hardware if they are not readily apparent.

[ Continue Reading.. ]

5 comments



Calculators have always fascinated me. For that matter numbers. Even before I could bring Dad's calculator to school I was busily working on paper with digits 0-9. Fascinated, just ... fascinated by what they meant, what they implied, and what they COULD mean with new definitions.

When I finally understood computers, I was quite interested. No, that's not the right word. I was OBSESSED. Obsessed to the point of mania would it could mean. What I could do. And what I could do with tools that worked with these numbers. Tools within tools. Numbers within numbers ...

So perhaps this is a work of love, real love, for the majesty and magnificence of numbers.

With that out of the way, let me show you what I have done.

I suppose it's a bit of a calculator, but with a difference. You can have ANY number of digits. And I mean any. Right now I have it scaled for 64-digits. That includes positive and negative.

Most importantly, it does NOT do it a single number at a time as you can tell. No, it truly does add and subtract every digit intelligently. So if you have 16-digits set. Then it will take no more than 5-loops or 80 looped statements to get the right value.

[ Continue Reading.. ]

1
5 comments



Cart #debug-2 | 2019-10-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5


to load this cart in Pico-8 immediate mode type:

load #debug-2

updated 10-18-19: Now works correctly no matter what the names of your functions are or even if you rename the debug() function itself.

Ah ! I bet you did not know about this ?

There is a command in Pico-8 that lets you see what function you are in as well as the line number ! Works with nested functions too, as deep as you please.

Debugging your code just got a lot easier.

Try out this sample program and feel free to use this function I put together to assist you. Every time you call DEBUG() it will display at the bottom of the screen what function called it and at what line number.

[ Continue Reading.. ]

5
2 comments



Sometimes you just can't get what you want by plotting sprites cause they may not be there or you've put a bunch of binary code on top of 'em. Sometimes you just MUST pixel.

Well, that's all good and well, and there's a few ways to go about it.

[1] Record every pixel in the area ahead of time and later plot it all out again.

[2] As above but only plot select pixels. In this case, do not plot black pixels.

[3] Unique method caching pixels. Explained later below.

[4] NEW ! Shoxidizer's Serializer.

[5] NEW ! Using PEEK and POKE.

Try this program I wrote:

by dw817
Cart #iymp-0 | 2019-10-18 | Code ▽ | Embed ▽ | No License


Use LEFT and RIGHT arrow keys to change drawing method.
Lots of moving and colorful sprites. It starts out in MODE 0, which is the 1st above.

[ Continue Reading.. ]

2 comments



What games have you had your eye on that you the most ?

This is by no means a complete list or in any any particular order, but these are definitely some games I thoroughly enjoy playing and playing again and will play again even after I have won them.


Wandering Magic - by @Overkill
Carmina - by @makz
A Messenger's Tale - by @JustFire45
Dungeo The Lich Queen - by @nephilim
Of Ineffable Nature - by @Jimmu
Jack Of Spades - by @BoneVolt
Dusk Child - by @SophieHoulden
Mai-Chan's Sweet Buns - by @Krystman
Celeste v0.1.2 - by @noel
Upward - by @matthias
Feed The Ducks - by @kittenm4ster
Just One Boss - by @bridgs
Minima 1.1.1 - by @Feneric
Dank Tomb - by @krajzeg
Alone In Pico - by @NuSan
Swordfish - by @chowyunbrent
Santa's Christmas Run - by @Tassilo
Charge! (LD39) 1.0 - by @DragonXVI
Kelin's Delivery - Rain v1.2.1 - by @NeithR
The Legend Of Bobby 0.7 - by @AbsolutRenal
The Green Legion v1.03 - by @guerragames
Buzzkill 1.4 - by @morningtoast
Eigengrau 0.1 - by @LeDjinn
Puzzle Cave I and II - by @hackefuffel
Tower Noire I - by @Cow

[size=16] [ Continue Reading.. ]

14
5 comments



by dw817
Cart #sots-2 | 2019-10-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3


update: put helpful remarks in ALL of code now.

This is not a very complex cart, or perhaps it is.

The classic SNAKE game has been around for many years and during that time some innovative programmers have figured out unique, interesting, and compact ways of handling it.

It's not simply drawing a line, it creates a trail that disappears behind the player according to how far in the game they are.

There are many approaches to writing this. As for me, I have always opted to ID the entire screen, in this case, all 15x15 tiles and use a number to represent a part of the snake.

The higher the number the longer it will be in play. Albeit a lower number means it will vanish more quickly.

[ Continue Reading.. ]

3
7 comments



stars in the galaxy.
Whoops, sorry, not that. No, something BETTER. Millions and billions of VALUES you can now use in Pico-8.

mib
by dw817
Cart #mib-0 | 2019-10-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2


load this in Pico-8 immediate mode with:

load #mib-0

I understand there was a library made sometime ago that could increase a value to trillions, but it could not decrease, let alone go beyond 0 to negative numbers.

Well, I sat down and thought about it. Realized that getting past 0 is a tricky thing indeed. Especially going from 0 to a negative number and found at least for me a fairly simple solution to get around it.

So what do you have here ?

Well, in the demo hit LEFT and RIGHT to choose a positive or negative number to add or subtract to your total. And calculate the result every time you hit (O).

[ Continue Reading.. ]

2
2 comments



Here is the latest, 10-18-19

brw
by dw817
Cart #brw-3 | 2019-10-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
7


To load this in Pico-8, in the console immediate mode type:

load #brw-3

. . .

brw
by dw817
Cart #brw-2 | 2019-10-15 | Code ▽ | Embed ▽ | No License
7


(older version)

Hope you don't mind me starting a new thread. I literally had to rewrite more than half the code here so I think it's deserving of it.

And yes, it now has a proportionally spaced font.

[ Continue Reading.. ]

7
16 comments



Now that I'm mixing and matching my metaphors in programming, metaphorically speaking of course, I'm running into some curious behavior by Pico-8.

For instance, take this code:

a="1"
b=2
?a+b

Which gives you 3, and that's fine.

But if you do this:

a="1"
b={1}
?b[a]

The result is NIL. Now I already know why it is because it's a string, but wouldn't it be easier for Pico (and possibly other programmers) to remove the number "type" completely and instead treat all variables as strings, only doing calculations when desired, and even then the results while visually appearing numerically are still just in truth a string ?

We already have ".." to show linking two strings together so there would be no difficulty with getting the "+" chosen correctly for calculations in determining whether or not it needs to be added to or appended to.

What problems would typecasting everything as a string cause ?

[ Continue Reading.. ]

10 comments





Top    Load More Posts ->